Skip to content

Added SPEL evaluation against spring boot @Topic attributes#556

Merged
artursouza merged 9 commits into
dapr:masterfrom
rovangju:issue_554
Jun 18, 2021
Merged

Added SPEL evaluation against spring boot @Topic attributes#556
artursouza merged 9 commits into
dapr:masterfrom
rovangju:issue_554

Conversation

@rovangju

@rovangju rovangju commented May 26, 2021

Copy link
Copy Markdown
Contributor

Description

Addresses #554 Update Spring Boot DaprBeanPostProcessor to evaluate expressions Topic attribute values:

  • pubsubname
  • name

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #554

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@ghost

ghost commented May 26, 2021

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@artursouza

Copy link
Copy Markdown
Contributor

This is awesome. Please, also modify the pubsub example to showcase this feature.

@artursouza artursouza self-assigned this May 26, 2021
@rovangju rovangju changed the title [WIP] Added SPEL evaluation against spring boot @Topic attribtutes [WIP] Added SPEL evaluation against spring boot @Topic attributes May 26, 2021
@rovangju

Copy link
Copy Markdown
Contributor Author

@artursouza Do you recommend I modify the SubscriberController pubsub example itself; or just drop a reference in the README.md in that directory?

@artursouza

Copy link
Copy Markdown
Contributor

@artursouza Do you recommend I modify the SubscriberController pubsub example itself; or just drop a reference in the README.md in that directory?

Please, modify the controller to actually make use of this feature.

@rovangju

rovangju commented Jun 5, 2021

Copy link
Copy Markdown
Contributor Author

I made the changes as requested - hopefully this makes it on your 1.3.0 milestone :)

@rovangju rovangju marked this pull request as ready for review June 5, 2021 01:30
@rovangju rovangju changed the title [WIP] Added SPEL evaluation against spring boot @Topic attributes Added SPEL evaluation against spring boot @Topic attributes Jun 5, 2021
@artursouza

Copy link
Copy Markdown
Contributor

Thanks for the contributions. Let's see if the validation for the examples will pass with this change.

@rovangju

rovangju commented Jun 8, 2021

Copy link
Copy Markdown
Contributor Author

Yes - I did that intentionally. The idea is to demonstrate that while myAppProperty doesn't exist - it will use the default value in the expression, messagebus ; thus passing the validation :)

artursouza
artursouza previously approved these changes Jun 13, 2021
@artursouza

Copy link
Copy Markdown
Contributor

LGTM. Thanks for your contribution.

@rovangju rovangju closed this Jun 14, 2021
@rovangju rovangju reopened this Jun 14, 2021
@codecov

codecov Bot commented Jun 14, 2021

Copy link
Copy Markdown

Codecov Report

Merging #556 (45e8862) into master (5c05f3d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #556   +/-   ##
=========================================
  Coverage     80.61%   80.61%           
  Complexity      985      985           
=========================================
  Files            88       88           
  Lines          3039     3039           
  Branches        332      332           
=========================================
  Hits           2450     2450           
  Misses          422      422           
  Partials        167      167           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c05f3d...45e8862. Read the comment docs.

@rovangju

Copy link
Copy Markdown
Contributor Author

Is there anything left for me to do on this?

@artursouza artursouza merged commit 0e5e311 into dapr:master Jun 18, 2021
@artursouza

Copy link
Copy Markdown
Contributor

Is there anything left for me to do on this?

No. I approved and then forgot to come back and merge after validations completed.

fackee pushed a commit to fackee/java-sdk that referenced this pull request Mar 28, 2022
* [WIP] Added SPEL evaluation against spring boot @Topic name and pubsubname attributes

* [WIP] Updated SubscriberController to use SPEL in @Topic

* 554 - SPEL for @Topic attributes: Updated documentation and examples

* Updated documentation as discussed

* Update README.md

* Update SubscriberController.java

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Signed-off-by: zjx244729 <zjx244729@alibaba-inc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Spring Boot DaprBeanPostProcessor to evaluate expressions Topic attribute values

2 participants